-- GENERATED SPELL FOR [Seasoned Irondeep Explorer] --


function spell0_13540(pUnit, Event) --@Cone of Cold,Self--
pUnit:FullCastSpellOnTarget(15244,pUnit)
pUnit:RegisterEvent('Sorts_13540', 8331, 1)
end

function spell1_13540(pUnit, Event) --@Fire Blast,n/a--
pUnit:FullCastSpellOnTarget(14145,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13540', 653, 1)
end

function spell2_13540(pUnit, Event) --@Fireball,n/a--
pUnit:FullCastSpellOnTarget(15242,pUnit:GetMainTank ())
pUnit:RegisterEvent('Sorts_13540', 3000, 1)
end

function spell3_13540(pUnit, Event) --@Frost Armor,Self--
pUnit:FullCastSpellOnTarget(12544,pUnit)
pUnit:RegisterEvent('Sorts_13540', 0, 1)
end

function Sorts_13540(pUnit, Event)
local choix_sorts_13540 = math.random(0, 3)
if choix_sorts_13540 == 0 then
pUnit:RegisterEvent('spell0_13540', 1, 1)
end
if choix_sorts_13540 == 1 then
pUnit:RegisterEvent('spell1_13540', 1, 1)
end
if choix_sorts_13540 == 2 then
pUnit:RegisterEvent('spell2_13540', 1, 1)
end
if choix_sorts_13540 == 3 then
pUnit:RegisterEvent('spell3_13540', 1, 1)
end
end

function mob13540_Action(pUnit, Event)
pUnit:RegisterEvent('Sorts_13540', math.random(1500, 3000), 1)
end

function mob13540_Leave(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13540_Kill(pUnit, Event)
--pUnit:RemoveEvents();--
end

function mob13540_Die(pUnit, Event)
pUnit:RemoveEvents();
end

RegisterUnitEvent(13540, 1, 'mob13540_Action')
RegisterUnitEvent(13540, 2, 'mob13540_Leave')
RegisterUnitEvent(13540, 3, 'mob13540_Kill')
RegisterUnitEvent(13540, 4, 'mob13540_Die')
